<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="xm"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
  function findMerListByCateAndNameKey(){
		var nameKey = document.getElementById("nameKey").value;
		var cateKey = document.getElementById("cateKey").value;
		if(nameKey==""){
			alert("请输入商品关键词");
			return ;
		}
		
		location.href='<%=request.getContextPath()%>/merchandise?m=findMerListByCateAndNameKey&nameKey='+nameKey+"&cateKey="+cateKey;
}

</script>
</head>
<body>
 <div id="top">
 	 <div class="logoDiv">
		<img alt=" " src="<%=request.getContextPath() %>/images/logo.png" class="navlogo">
 	 </div>
 	 <div class="serachDiv">
 	 	
 	 	 <img alt=" " src="<%=request.getContextPath() %>/images/sousuo2.png" class="navSearch">
 	 	 <input  value="商品关键字" class="navSearch" id="nameKey" title="请输入你想买的商品">
 	 	 <select class="navSearch"  id="cateKey" >
 	 	 		<option value="-1" style="color:purple;">所有商品</option>
 	 	 		<xm:forEach items="${cateList }" var="cate">
 	 	 		<option value="${cate.id}" style="color:purple;"   >${cate.cateName }</option>
 				</xm:forEach>
 	 	 </select>
 	 	 <img alt="" src="<%=request.getContextPath() %>/images/sousuo4.png" class="navSearch" onclick="findMerListByCateAndNameKey()">
 	 	 
 	 </div>
 	
 </div>
 <div id="menu">
 	 <ul>
 	 	 <li>
 	 	 	 <a href="<%=request.getContextPath() %>/browseIndex">商城首页</a>	 
 	 	 </li>
 	 	 <li>
	          <a href="<%=request.getContextPath() %>/filter/orders?m=list">订单管理</a>
 	 	 </li>
 	 	 <li>
 	 	 	 <a href="<%=request.getContextPath() %>/filter/cart?m=list">购物车管理</a>	 
 	 	 </li>
 	 	 <li>
 	 	 	 <a href="<%=request.getContextPath() %>/filter/leaveword?m=list">顾客留言</a>	 
 	 	 </li>
 	 	 <li>
 	 	 	 <a href="<%=request.getContextPath() %>/filter/member?m=update">修改注册资料</a>
 	 	 	 
 	 	 	 	 
 	 	 </li>
 	 	 <li>
 	 		 
 	 	 	 <a href="<%=request.getContextPath() %>/admin">我是管理员</a>	 
 	 	 </li>
 	 </ul>
   </div>
</body>
</html>